//
//  CAShapeLayer+Shadow.m
//  ZXKlineDemo
//
//  Created by wanmeizty on 2018/5/14.
//  Copyright © 2018年 郑旭. All rights reserved.
//

#import "CAShapeLayer+Shadow.h"

@implementation CAShapeLayer (Shadow)
- (void)drawStartPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint strokeColor:(CGColorRef)strokeColor{
    UIBezierPath * linePath = [UIBezierPath bezierPath];
    [linePath moveToPoint:startPoint];
    [linePath addLineToPoint:endPoint];
    self.path = linePath.CGPath;
    self.strokeColor = strokeColor;
    
}
- (void)drawRect:(CGRect)rect fillColor:(CGColorRef)fillColor strokeColor:(CGColorRef)strokeColor{
    UIBezierPath * linePath = [UIBezierPath bezierPathWithRoundedRect:rect cornerRadius:0];
    self.path = linePath.CGPath;
    self.strokeColor = strokeColor;
    self.fillColor = fillColor;
}

- (void)drawbezierPath:(UIBezierPath *)bezierPath fillColor:(CGColorRef)fillColor strokeColor:(CGColorRef)strokeColor{
    self.path = bezierPath.CGPath;
    if (strokeColor) {
        self.strokeColor = strokeColor;
    }
    if (fillColor) {
        self.fillColor = fillColor;
    }
}

@end
